<template>
  <div id="add-cater-merchants" class="route-page">
    <el-button
      @click="goback()"
      size="mini"
      round
      style="margin-left: 950px"
      type="primary"
      >返回</el-button
    >

    <div class="container" style="padding-left: 80px; padding-right: 20px">
      <el-form
        ref="formCorp"
        :model="formCorp"
        :rules="rules"
        :inline-message="true"
        label-position="left"
        label-width="100px"
        size="medium"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-document"></i>基础信息
        </span>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店铺名称:" prop="storeName">
                <el-input
                  v-model="formCorp.storeName"
                  placeholder="请输入店铺名称"
                  clearable
                  style="width: 180px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="15" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="店铺类型:" prop="storeType">
                <template v-for="item in storeType">
                  <el-radio
                    :key="item.value"
                    v-model="formCorp.storeType"
                    :label="item.value"
                    >{{ item.label }}</el-radio
                  >
                </template>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="所属大区:" prop="upOrgSeq">
                <el-select
                  v-model="formCorp.upOrgSeq"
                  placeholder="请选择"
                  clearable
                  @change="selCore(formCorp.upOrgSeq)"
                  style="width: 180px;"
                >
                  <el-option
                    v-for="item in corpList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item
                label="所属营销区域:"
                label-width="110px"
                prop="baseCode"
              >
                <el-select
                  v-model="formCorp.baseCode"
                  placeholder="请选择"
                  clearable
                  @change="selbase"
                  style="width: 180px;"
                >
                  <el-option
                    v-for="item in RentalPayWay"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  ></el-option>
                </el-select>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="经营面积(㎡):"
                prop="managerArea"
                label-width="110px"
              >
                <el-input
                  v-model="formCorp.managerArea"
                  placeholder="请输入经营面积"
                  clearable
                  style="width: 180px"
                  type="number"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item
                label="订单客户编号:"
                prop="orderCustomerCode"
                label-width="110px"
              >
                <el-input
                  v-model="formCorp.orderCustomerCode"
                  style="width: 180px"
                  placeholder="请输入订单客户编号"
                />
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>
      <!-- </el-col>
            </el-row>-->
      <!-- 商户选择 end -->

      <!-- 填写店铺信息 -->
      <!-- <el-row>
            <el-col :span="12" :offset="6">-->
      <el-form
        ref="formShop"
        :model="formShop"
        :rules="shopRules"
        :inline-message="true"
        label-position="left"
        label-width="95px"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-suitcase"></i>店铺信息
        </span>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="开业日期:" prop="openDate">
                <el-date-picker
                  v-model="formShop.openDate"
                  placeholder="选择日期"
                  format="yyyy-MM-dd"
                  value-format="yyyy-MM-dd"
                  type="date"
                ></el-date-picker>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="12" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item label="所属省市:" prop="city">
                <v-distpicker
                  :province="select.province"
                  :city="select.city"
                  :area="select.area"
                  @selected="onSelected"
                ></v-distpicker>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20" style="margin-bottom: 20px">
          <el-col :span="6" :push="1">
            <div
              class="grid-content bg-purple"
              style="position: absolute; z-index: 1010;"
            >
              <el-select
                class="grid-content__select"
                popper-class="grid-content__select--popper"
                v-model="suggestion"
                filterable
                remote
                reserve-keyword
                placeholder="请输入店铺地址:"
                :remote-method="tublur"
                :loading="suggestionLoading"
                value-key="location"
                @change="onSelectAddress"
              >
                <el-option
                  v-for="item in suggestionList"
                  :key="item.id"
                  :label="
                    `${item.address}  ${item.province} - ${item.city} - ${item.district}`
                  "
                  :value="item.id"
                />
              </el-select>
            </div>
          </el-col>
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <div
                id="container"
                style="width: 900px; height: 400px"
                @click="clicktu()"
              ></div>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="店铺详细地址:"
                prop="storeAddressDetail"
                label-width="115px"
              >
                <!-- <el-button
                  type="primary"
                  @click="getlocation()"
                  size="mini"
                  icon="el-icon-search"
                  style="margin-top:5px"
                                >点击地图获取经纬度详细地址</el-button>-->
                <el-input
                  v-model="formShop.storeAddressDetail"
                  placeholder="请获取店铺详细地址"
                  clearable
                  style="width: 200px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="经度:" prop="storeLng">
                <el-input
                  v-model="formShop.storeLng"
                  placeholder="请获取经度"
                  clearable
                  disabled
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="纬度:" prop="storeLat">
                <el-input
                  v-model="formShop.storeLat"
                  placeholder="请获取纬度"
                  clearable
                  disabled
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="经销商名:" prop="companyName">
                <el-input
                  v-model="formShop.companyName"
                  placeholder="请输入经销商名"
                  clearable
                  style="width: 200px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="12" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="营业时间:" prop="value2">
                <el-time-picker
                  v-model="formShop.value1"
                  format="HH:mm"
                  value-format="HH:mm"
                  placeholder="营业开始时间"
                  style="width: 150px"
                  @change="changekaishi(formShop.value1)"
                >
                </el-time-picker
                >-
                <el-time-picker
                  v-model="formShop.value2"
                  format="HH:mm"
                  value-format="HH:mm"
                  placeholder="营业结束时间"
                  style="width: 150px"
                  @change="changejieshu(formShop.value2)"
                >
                </el-time-picker>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>

      <!-- 填写店铺信息 end -->

      <!-- 填写展示信息 -->

      <el-form
        ref="formShopShow"
        :model="formShopShow"
        :rules="shopShowRules"
        :inline-message="true"
        label-position="left"
        label-width="95px"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-data-analysis"></i>展示信息
        </span>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="法人:" prop="legalPerson">
                <el-input
                  v-model="formShopShow.legalPerson"
                  placeholder="请输入法人名称"
                  clearable
                  style="width: 200px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item
                label="法人手机号:"
                prop="legalPersonPhone"
                label-width="120px"
              >
                <el-input
                  onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
                  v-model="formShopShow.legalPersonPhone"
                  placeholder="请输入法人手机号"
                  clearable
                  style="width: 200px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店主姓名:" prop="storeOwnerName">
                <el-input
                  v-model="formShopShow.storeOwnerName"
                  placeholder="请输入店主姓名"
                  clearable
                  style="width: 200px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item
                label="店主手机号:"
                prop="storeOwnerPhone"
                label-width="120px"
              >
                <el-input
                  v-model="formShopShow.storeOwnerPhone"
                  placeholder="请输入店主手机号"
                  clearable
                  onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
                  style="width: 200px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店铺电话:" prop="storePhone">
                <el-input
                  v-model="formShopShow.storePhone"
                  placeholder="请输入店铺电话"
                  clearable
                  style="width: 180px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="店长姓名:" prop="storeManagerName">
                <el-input
                  v-model="formShopShow.storeManagerName"
                  placeholder="请输入店长姓名"
                  clearable
                  style="width: 180px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item label="店长电话:" prop="storeManagerPhone">
                <el-input
                  v-model="formShopShow.storeManagerPhone"
                  placeholder="请输入店长电话"
                  clearable
                  onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
                  style="width: 180px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="店主照片:"
                prop="storeOwnerPic"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview2"
                      :on-success="upLoadPictwo"
                      :on-remove="handleRemovetwo"
                      :on-change="handleImgChangetwo"
                      :before-upload="beforeAvatarUploadtwo"
                      :file-list="imgListtwo"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible3">
                      <img width="100%" :src="dialogImageUrl2" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                :label="shopname"
                prop="storeManagerPic"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview3"
                      :on-success="upLoadPicthree"
                      :on-remove="handleRemovethree"
                      :on-change="handleImgChangethree"
                      :before-upload="beforeAvatarUploadthree"
                      :file-list="imgListthree"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible4">
                      <img width="100%" :src="dialogImageUrl3" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>

      <!-- 填写展示信息 end -->
      <span
        style="
                    font-size: 20px;
                    margin: 30px 40px;
                    display: inline-block;
                    color: #000;
                "
      >
        <i class="el-icon-document"></i>店铺人员信息
      </span>
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-form-item label="店员姓名：">
          <el-input v-model="formInline.realName" placeholder></el-input>
        </el-form-item>
        <el-form-item label="手机号：">
          <el-input v-model="formInline.tel" placeholder></el-input>
        </el-form-item>
        <el-form-item label="身份证号码：">
          <el-input v-model="formInline.idCard" placeholder></el-input>
        </el-form-item>
        <el-form-item label="店铺人员编码：">
          <el-input v-model="formInline.employeeNo" placeholder></el-input>
        </el-form-item>
        <el-form-item label="状态：">
          <el-select v-model="formInline.status" placeholder="全部" clearable>
            <el-option label="启用" value="1"></el-option>
            <el-option label="停用" value="0"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            @click="search()"
            size="mini"
            icon="el-icon-search"
            >查询</el-button
          >
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            @click="kong()"
            size="mini"
            icon="el-icon-delete"
            >清空</el-button
          >
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            @click="creatoneOrg()"
            size="mini"
            icon="el-icon-edit"
            >新增</el-button
          >
        </el-form-item>
        <!-- <el-form-item>
        <el-button type="primary" @click="goback()" size="mini" >返回</el-button>
      </el-form-item> -->
      </el-form>
      <el-table
        :data="tableData"
        :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
        style="width: 100%; margin-bottom: 20px"
        row-key="goodsTypeId"
        border
        v-loading="loading"
        default-expand-all
      >
        <el-table-column
          type="index"
          label="序号"
          align="center"
          width="60"
          fixed
        ></el-table-column>

        <el-table-column
          prop="employeeNo"
          label="店员编号"
          width="180"
        ></el-table-column>

        <el-table-column
          prop="userType"
          label="职位"
          align="center"
          width="150"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.userType == 4">店主</span>
            <span v-if="scope.row.userType == 5">店长</span>
            <span v-if="scope.row.userType == 6">店员</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="isFullTime"
          label="是否专职"
          align="center"
          width="100"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.isFullTime == 0">否</span>
            <span v-if="scope.row.isFullTime == 1">是</span>
          </template>
        </el-table-column>
        <el-table-column prop="sex" label="性别" width="100" align="center">
          <!-- <template slot-scope="scope">{{scope.row.sex===1?'男':'女'}}</template> -->
          <template slot-scope="scope">
            <span v-if="scope.row.sex == 1">男</span>
            <!-- <span v-if="scope.row.sex==2">女</span> -->
            <span v-if="scope.row.sex == 0">女</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="realName"
          label="店员姓名"
          width="180"
          align="center"
        ></el-table-column>

        <el-table-column
          prop="tel"
          label="手机号码"
          align="center"
          width="150"
        ></el-table-column>
        <el-table-column
          prop="academic"
          label="学历"
          align="center"
          width="150"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.academic == 0">高中以下</span>
            <span v-if="scope.row.academic == 1">大专</span>
            <span v-if="scope.row.academic == 2">本科</span>
            <span v-if="scope.row.academic == 3">硕士</span>
          </template>
        </el-table-column>

        <el-table-column
          prop="workYear"
          label="工作年限（年）"
          align="right"
          width="150"
        >
        </el-table-column>
        <el-table-column
          prop="idCard"
          label="身份证号码"
          align="center"
          width="180"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="headPicUrl"
          label="店员头像"
          width="200"
        >
          <template slot-scope="scope">
            <img
              :src="scope.row.headPicUrl"
              v-if="scope.row.headPicUrl != '' && scope.row.headPicUrl != null"
              width="70"
              height="50"
            />
          </template>
        </el-table-column>
        <el-table-column prop="status" label="状态" width="100" align="center">
          <template slot-scope="scope">{{
            scope.row.status === 0 ? '停用' : '启用'
          }}</template>
        </el-table-column>

        <el-table-column
          prop="memberCount"
          label="绑定会员数"
          align="right"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="saleAmount"
          label="销售额"
          align="right"
        ></el-table-column>
        <el-table-column
          prop="createTime"
          label="创建时间"
          align="center"
          width="200"
        ></el-table-column>
        <!-- <el-table-column prop="authCode" label="店铺编码" align="right" width="120"></el-table-column> -->
        <el-table-column prop="saleAmount" label="信息是否完整" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.isInfoComplete == 0">否</span>
            <span v-if="scope.row.isInfoComplete == 1">是</span>
          </template>
        </el-table-column>

        <el-table-column
          prop="onboardDate"
          label="上岗日期"
          align="center"
          width="200"
        ></el-table-column>
        <el-table-column label="操作" width="280" align="center" fixed="right">
          <template slot-scope="scope">
            <el-button
              type="text"
              v-if="scope.row.status == 1 && scope.row.userType != 5"
              size="mini"
              @click="
                updateStatus(
                  scope.row.uuid,
                  scope.row.userId,
                  0,
                  scope.row.userType
                )
              "
              >停用</el-button
            >
            <el-button
              type="text"
              v-if="scope.row.status == 0 && scope.row.userType != 5"
              @click="
                updateStatus(
                  scope.row.uuid,
                  scope.row.userId,
                  1,
                  scope.row.userType
                )
              "
              size="mini"
              >启用</el-button
            >
            <el-button type="text" size="mini" @click="changeorg(scope.row)"
              >修改</el-button
            >
            <el-button
              type="text"
              size="mini"
              @click="handledelete(scope.row)"
              v-if="scope.row.userType != 5"
              >删除
            </el-button>
          </template>
        </el-table-column>
        <!-- <el-table-column label="操作" width="280" align="center" fixed="right" v-if="this.flagdianyuanone">
        <template slot-scope="scope">  -->
        <!-- <el-button
            type="text"
            v-if="scope.row.status == 1"
            size="mini"
            @click="updateStatus(scope.row.userId,0)"
          >停用</el-button>
          <el-button
            type="text"
            v-if="scope.row.status == 0"
            @click="updateStatus(scope.row.userId,1)"
            size="mini"
          >启用</el-button> -->
        <!-- <el-button type="text" size="mini" @click="changeorg(scope.row)">修改</el-button> -->
        <!-- <el-button type="text" size="mini" @click="handledelete(scope.row)">删除</el-button> -->
        <!-- </template>
      </el-table-column> -->
      </el-table>
      <el-form :inline="true" :model="formInline">
        <el-form-item style="margin-top: 6px"></el-form-item>
      </el-form>
      <div class="block" style="margin-top: -49px">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :page-sizes="[10, 20, 30, 50, 100]"
          :current-page="listQuery.current"
          :page-size="listQuery.size"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
        ></el-pagination>
      </div>

      <el-dialog title="信息" :visible.sync="dialogVisibleorg" width="50%">
        <el-form
          :model="ruleForm"
          :rules="dianyuanrules"
          ref="ruleForm"
          label-width="120px"
        >
          <el-form-item label="姓名" prop="realName">
            <el-input v-model="ruleForm.realName" maxlength="20"></el-input>
          </el-form-item>
          <el-form-item prop="onboardDate" label="上岗日期">
            <el-date-picker
              placeholder="选择日期"
              v-model="ruleForm.onboardDate"
              style="width: 70%"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="性别" prop="sex">
            <el-select v-model="ruleForm.sex">
              <el-option label="男" value="1"></el-option>
              <el-option label="女" value="0"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="学历" prop="academic">
            <el-select v-model="ruleForm.academic">
              <el-option label="高中以下" value="0"></el-option>
              <el-option label="大专" value="1"></el-option>
              <el-option label="本科" value="2"></el-option>
              <el-option label="硕士" value="3"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="是否专职" prop="isFullTime">
            <el-select v-model="ruleForm.isFullTime">
              <el-option label="是" value="1"></el-option>
              <el-option label="否" value="0"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="工作年限" prop="workYear">
            <el-input
              v-model="ruleForm.workYear"
              type="number"
              style="width: 200px"
              min="0"
            ></el-input>
            <span>年</span>
          </el-form-item>
          <el-form-item label="手机号" prop="tel">
            <el-input v-model="ruleForm.tel"></el-input>
          </el-form-item>
          <el-form-item label="身份证号码" prop="idCard">
            <el-input v-model="ruleForm.idCard"></el-input>
          </el-form-item>
          <el-form-item label="状态" prop="status">
            <el-select v-model="ruleForm.status" :disabled="this.flagdianone">
              <el-option label="停用" value="0"></el-option>
              <el-option label="启用" value="1"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="店员照片" prop="headPicUrl">
            <el-row>
              <el-col style="margin: 10px; 0px; 10px; 0">
                <el-upload
                  style="margin: 10px"
                  :action="action"
                  list-type="picture-card"
                  :limit="1"
                  :on-preview="handlePictureCardPreviewyuan"
                  :on-success="upLoadPiconeyuan"
                  :on-change="handleImgChangeoneyuan"
                  :file-list="imgListoneyuan"
                  :headers="headers"
                  :on-exceed="handleExceed"
                >
                  <i class="el-icon-plus"></i>
                </el-upload>
              </el-col>
            </el-row>
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="dialogVisibleorg = false" size="mini"
            >取 消</el-button
          >
          <el-button type="primary" @click="confirmEditone()" size="mini"
            >确 定</el-button
          >
        </span>
      </el-dialog>
      <el-dialog :visible.sync="dialogVisibleImg">
        <img width="100%" :src="dialogImageUrl" alt />
      </el-dialog>

      <!-- 租金\收银 -->

      <el-form
        ref="formRental"
        :model="formRental"
        :rules="RentalRules"
        :inline-message="true"
        label-position="left"
        label-width="140px"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-bank-card"></i>工行建档信息
        </span>
        <el-row :gutter="20">
          <el-col :span="18" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="是否有工行对公账户："
                prop="isIcbc"
                label-width="220px"
              >
                <el-select
                  v-model="formRental.isIcbc"
                  @change="changeisIcbc(formRental.isIcbc)"
                  style="width: 200px"
                >
                  <el-option label="是" value="1"></el-option>
                  <el-option label="否" value="0"></el-option>
                </el-select>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                prop="businessLicense"
                label="营业执照:"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :on-preview="handlePictureCardPreview"
                      :on-success="upLoadPic"
                      :limit="1"
                      :on-remove="handleRemove"
                      :on-change="handleImgChange"
                      :file-list="imgList"
                      :before-upload="beforeAvatarUpload"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible1">
                      <img width="100%" :src="dialogImageUrl" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="专卖店门头图片:"
                prop="doorwayPic"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview1"
                      :on-success="upLoadPicone"
                      :on-remove="handleRemoveone"
                      :on-change="handleImgChangeone"
                      :before-upload="beforeAvatarUploadone"
                      :file-list="imgListone"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible2">
                      <img width="100%" :src="dialogImageUrl1" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="门店内景照照片:"
                prop="storeHallPhoto"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview13"
                      :on-success="upLoadPic13"
                      :on-remove="handleRemove13"
                      :on-change="handleImgChange13"
                      :before-upload="beforeAvatarUpload13"
                      :file-list="imgList13"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible13">
                      <img width="100%" :src="dialogImageUrl13" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span style="font-size: 12px; margin-left: 20px;color: red;"
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="门牌号照片:"
                prop="storeNumberPhoto"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview15"
                      :on-success="upLoadPic15"
                      :on-remove="handleRemove15"
                      :on-change="handleImgChange15"
                      :before-upload="beforeAvatarUpload15"
                      :file-list="imgList15"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible15">
                      <img width="100%" :src="dialogImageUrl15" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span style="font-size: 12px; margin-left: 20px;color: red;"
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="法人身份证正面照片:"
                prop="frontCard"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreviewshenzheng"
                      :on-success="upLoadPicshenzheng"
                      :on-remove="handleRemoveshenzheng"
                      :on-change="handleImgChangeshenzheng"
                      :before-upload="beforeAvatarUploadshenzheng"
                      :file-list="imgListshenzheng"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisibleshenzheng">
                      <img width="100%" :src="dialogImageUrlshenzheng" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span style="font-size: 12px; color: red"
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="法人身份证背面照片:"
                prop="backCard"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreviewshenfan"
                      :on-success="upLoadPicshenfan"
                      :on-remove="handleRemoveshenfan"
                      :on-change="handleImgChangeshenfan"
                      :before-upload="beforeAvatarUploadshenfan"
                      :file-list="imgListshenfan"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisibleshenfan">
                      <img width="100%" :src="dialogImageUrlshenfan" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="20" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="结算账号照片（开户许可证或其他）:"
                prop="settlementPic"
                label-width="220px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreviewjie"
                      :on-success="upLoadPicjie"
                      :on-remove="handleRemovejie"
                      :on-change="handleImgChangejie"
                      :before-upload="beforeAvatarUploadjie"
                      :file-list="imgListjie"
                      :headers="headers"
                      :on-exceed="handleExceed"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisiblejie">
                      <img width="100%" :src="dialogImageUrljie" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片不超过30M,仅支持jpg、png格式）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>

        <el-form-item
          label="法定代表人授权书:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="fading"
        >
          <div>
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('1')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
                            >下载模板及打印件</el-button>-->
              <a
                :href="`${baseUrl}/ui/moban/法定代表人授权书模板及打印件.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <!-- <el-button type="primary">上传扫描件</el-button> -->
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangefa"
                :on-success="upLoadPicfa"
                :on-remove="handleRemovefa"
                :file-list="fileListfa"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('1')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
            <!-- <input
                      type="file"
                      id="people-export"
                      ref="inputer"
                      @change="fileUpload"
                      multiple="multiple"
                        />-->
          </div>
        </el-form-item>
        <el-form-item
          label="信息查询使用授权书:"
          label-width="160px"
          prop="xinxi"
          style="margin: 50px 0; margin-left: 40px"
        >
          <div>
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('2')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
                            >下载模板及打印件</el-button>-->
              <a
                :href="`${baseUrl}/ui/moban/信息查询使用授权书.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangexin"
                :on-remove="handleRemovexin"
                :file-list="fileListxin"
                :on-success="upLoadPicxin"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('2')"
                  style="float: right; margin: 10px"
                  icon="el-icon-upload2"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
        <el-form-item
          label="收单业务书:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="shoudan"
        >
          <div style="margin: 20px 0">
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('3')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
                            >下载模板及打印件</el-button>-->
              <a :href="`${baseUrl}/ui/moban/收单业务书.zip`" class="xizai"
                >下载模板及打印件</a
              >
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangeshou"
                :file-list="fileListshou"
                :on-remove="handleRemoveshou"
                :on-success="upLoadPicshou"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('3')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
      </el-form>

      <!-- 租金\收银 end -->

      <el-button
        type="success"
        plain
        style="margin-top: 2px; margin-left: 350px"
        @click="saveCaogao(), (ccloading = true)"
        :loading="ccloading"
        >保存草稿</el-button
      >
      <el-button
        type="success"
        style="margin-top: 2px"
        @click="postFormAjax(), (loading = true)"
        :loading="loading"
      >
        提交审核</el-button
      >
    </div>
    <!-- <el-dialog :visible.sync="showMapComponent" @close="cancel" width="65%"> -->
    <!-- <div class="map">
        <el-input
          v-model="addressKeyword"
          placeholder="请输入地址来直接查找相关位置"
          clearable
          style="margin-bottom:20px"
          id="place"
        >
          <el-button slot="append" icon="el-icon-search" @click="getAddressKeyword"></el-button>
        </el-input>
        <div id="container" style="width:100%; height:300px"></div>
        </div>-->
    <!-- <p style="margin:5px">
        <input style="width:200px;padding:3px 4px;z-index:3000" type="text" id="place" />
      </p>
        <div id="container" style="width:800px;height:400px;z-index:3000"></div>-->

    <!-- <span slot="footer">
        <el-button icon="el-icon-close" @click="cancel">取 消</el-button>
        <el-button icon="el-icon-place" type="primary" @click="confirm">确 定</el-button>
        </span>-->
    <!-- </el-dialog> -->
  </div>
</template>
<!-- <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77"></script> -->

<script>
import {
  getAllZone,
  getAllBase,
  getBaseUserInfo,
  applyShop,
  phoneVerification,
  saveUserReviewInfo,
  queryUserIcbcTemp,
  uploadFile,
  queryUserStoreInfo,
} from '@/api/addShopapply.js';
import {
  //   queryGoodsTypeList,
  //   addGoodsType,
  //   addLowerGoodsType,
  //   deleteGoodsType,
  //   updaterole,
  //   getUserOrgType
  qryReviewClerk,
  reviewClerkUpdate,
  reviewClerkDelete,
} from '@/api/shopMemberset';
import qs from 'qs';
import { shopAuthdetail } from '@/api/loginApi';
import VDistpicker from 'v-distpicker';
// import mapComponent from "@/components/mapComponent";
import imgSize from '@/utils/common';
import { dict } from '../../dict';

let map = null;
let marker = null;

export default {
  name: 'AddCaterMerchants',
  components: {
    VDistpicker,
  },

  data() {
    return {
      action: `${process.env.VUE_APP_BASE_API}/api/file-service/v1/file/uploadFile`,
      baseUrl: process.env.VUE_APP_BASE_API,
      xiugairenTel: '',
      headers: {
        token: localStorage.getItem('token'), //从cookie里获取token，并赋值  Authorization ，而不是token
      },
      shopname: '',
      tableData: [],
      userType: '',
      txtVal: '',
      picUrl: '',
      loading: true,
      dialogVisibleorg: false,
      dialogVisibleorgone: false,
      imgListoneyuan: [],
      imgListtwo: [],
      ruleForm: {
        orgSeq: '',
        realName: '',
        onboardDate: '',
        workYear: '',
        academic: '',
        tel: '',
        status: '1',
        headPicUrl: '',
        idCard: '',
        sex: '',
        isFullTime: '',
      },
      orgSeqxia: '',
      orgList: {},
      flagdian: false,
      total: 0,
      options: [],
      optionsone: [],
      listQuery: {
        current: 1,
        size: 10,
      },
      orgSeq: '',
      flagorg: false,
      dialogVisible: false,
      flagdianyuanone: false,
      flagdianyuan: false,
      dialogVisibleImg: false,
      flagdianone: false,
      dialogImageUrl: '',
      formInline: {
        realName: '',
        workYear: '',
        academic: '',
        tel: '',
        status: '',
        idCard: '',
        sex: '',
        employeeNo: '',
      },
      orgList: [],
      userId: '',
      uuidyuan: '',
      dianyuanrules: {
        realName: [
          {
            required: true,
            message: '请输入店员姓名',
            trigger: 'blur',
          },
        ],
        onboardDate: [
          {
            required: true,
            message: '请输入上岗日期',
            trigger: 'blur',
          },
        ],
        workYear: [
          {
            required: true,
            message: '请输入工作年限',
            trigger: 'blur',
          },
        ],
        isFullTime: [
          {
            required: true,
            message: '请选择是否专职',
            trigger: 'blur',
          },
        ],
        academic: [
          {
            required: true,
            message: '请选择学历',
            trigger: 'blur',
          },
        ],
        sex: [
          {
            required: true,
            message: '请选择性别',
            trigger: 'blur',
          },
        ],
        status: [
          {
            required: true,
            message: '请选择状态',
            trigger: 'blur',
          },
        ],
        tel: [
          {
            required: true,
            message: '请输入手机号',
            trigger: 'blur',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        idCard: [
          {
            required: true,
            message: '请输入身份证号码',
            trigger: 'blur',
          },

          {
            pattern: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
            message: '请输入正确的身份证号',
            trigger: 'blur',
          },
        ],
        headPicUrl: [
          {
            required: true,
            message: '请上传图片',
            trigger: 'blur',
          },
        ],
      },
      fileList: [],
      map: null,
      loading: false,
      ccloading: false,
      getAddress: null,
      getAddCode: null,
      addressKeyword: '',
      isnum: 0,
      dialogVisible1: false,
      dialogVisible2: false,
      dialogVisiblejie: false,
      dialogVisibleshenzheng: false,
      dialogVisibleshenfan: false,
      dialogImageUrljie: false,
      dialogVisible3: false,
      dialogVisible4: false,
      dialogVisible13: false,
      dialogVisible15: false,
      dialogVisible16: false,
      icbcstatus: '',
      imgList: [],
      imgListone: [],
      imgList13: [],
      imgList15: [],
      imgList16: [],
      imgListtwo: [],
      imgListthree: [],
      imgListjie: [],
      fileListfa: [],
      fileListxin: [],
      fileListshou: [],
      fileListfei: [],
      fileListdui: [],
      fileListfeizi: [],
      fileListdan: [],
      imgListjie: [],
      imgListshenzheng: [],
      imgListshenfan: [],
      data1: '',
      BMap: null, // 地图组件是否就绪
      showMapComponent: false,
      keyword: '', // 地区搜索的信息
      mapStyle: {
        width: '100%',
        height: this.mapHeight + 'px',
      },
      markersArray: [], //用来存储标注
      center: {
        lng: 116.404,
        lat: 39.915,
      },
      select: {
        province: '',
        city: '',
        area: '',
      },

      active: 0, //步骤计数
      // 选择商户

      formCorp: {
        storeName: '',
        storeType: '1', //店铺类型(1标准店、2精品店、3综合体验店)

        upOrgSeq: '',
        baseCode: '',
        // basePersonCode: "",
        baseName: '',
        basePersonName: '',
        managerArea: '',
        orderCustomerCode: '',
      },
      headers: {
        token: localStorage.getItem('token'),
      },
      rules: {
        storeName: [
          {
            required: true,
            message: '请输入店铺名称',
          },
        ],
        storeType: [
          {
            required: true,
            message: '请输入店铺类型',
          },
        ],
        upOrgSeq: [
          {
            required: true,
            message: '请选择所属大区',
          },
        ],
        baseName: [
          {
            required: true,
            message: '请选择所属营销区域',
          },
        ],
        managerArea: [
          {
            required: true,
            message: '请输入经营面积',
          },
        ],
        orderCustomerCode: [
          {
            required: true,
            message: '请输入订单客户编号',
          },
        ],
      },
      corpDetails: {}, //商家详情
      corpList: [], //商户列表
      Renarr: [],
      // 选择商户 end
      // 文件
      //   dialogVisible: false,
      dialogImageUrl: '',
      dialogImageUrl1: '',
      dialogImageUrl2: '',
      dialogImageUrl3: '',
      dialogImageUrl13: '',
      dialogImageUrl15: '',
      dialogImageUrl16: '',

      dialogImageUrlshenzheng: '',
      dialogImageUrlshenfan: '',

      // /文件
      // 店铺信息
      formShop: {
        openDate: '', //经营状态
        province: '', //租赁时间 开业时间
        area: '',
        city: '',
        storeAddressDetail: '',
        storeLng: '',
        storeLat: '',
        companyName: '',
        shopHours: '',
        value1: '9:00',
        value2: '21:00',
      },
      openTime: [],
      shopRules: {
        openDate: [
          {
            required: true,
            message: '请输入开业日期',
          },
        ],
        province: [
          {
            required: true,
            message: '请输入所属省份',
          },
        ],
        city: [
          {
            required: true,
            message: '请输入所属城市',
          },
        ],
        storeAddressDetail: [
          {
            required: true,
            message: '请输入店铺详细地址',
          },
        ],
        storeLng: [
          {
            required: true,
            message: '请获取经度',
          },
        ],
        storeLat: [
          {
            required: true,
            message: '请获取纬度',
          },
        ],
        companyName: [
          {
            required: true,
            message: '请输入经销商名',
          },
        ],
        value2: [
          {
            required: true,
            message: '请输入营业时间',
          },
        ],
        // value1: [{ required: true, message: "请输入营业开始时间" }],
        // value2: [{ required: true, message: "请输入营业结束时间" }]
      },
      // 星期
      checkAllWeek: false,
      authCode: '',
      isIndeterminate: true,
      mainuuid: '',
      week: [
        {
          weekNum: 1,
          weekName: '星期一',
        },
        {
          weekNum: 2,
          weekName: '星期二',
        },
        {
          weekNum: 3,
          weekName: '星期三',
        },
        {
          weekNum: 4,
          weekName: '星期四',
        },
        {
          weekNum: 5,
          weekName: '星期五',
        },
        {
          weekNum: 6,
          weekName: '星期六',
        },
        {
          weekNum: 0,
          weekName: '星期天',
        },
      ],
      // 每日时间
      DateTime: [
        {
          value: '1',
          label: '每日营业时间一致',
        },
      ],
      // 店铺信息
      // 店铺展示
      formShopShow: {
        legalPerson: '',
        legalPersonPhone: '',
        storeOwnerName: '',
        storeOwnerPhone: '',
        storePhone: '',
        storeOwnerGrade: '',
        storeManagerPhone: '',
        storeManagerName: '',

        storeOwnerPic: '',
        storeManagerPic: '',
      },
      shopShowRules: {
        legalPerson: [
          {
            required: true,
            message: '请输入法人代表',
          },
        ],
        legalPersonPhone: [
          {
            required: true,
            message: '请输入法人手机号',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        storeOwnerName: [
          {
            required: true,
            message: '请输入店主姓名',
          },
        ],
        storeOwnerPhone: [
          {
            required: true,
            message: '请输入店主手机号',
            trigger: 'blur',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        storePhone: [
          {
            required: true,
            message: '请输入店铺电话',
          },
          //   {
          //     pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/,
          //     message: "请输入正确的手机号",
          //     trigger: "blur"
          //   }
        ],
        storeOwnerGrade: [
          {
            required: true,
            message: '请输入店铺评级',
          },
        ],
        storeManagerPhone: [
          {
            required: true,
            message: '请输入店长电话',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        storeManagerName: [
          {
            required: true,
            message: '请输入店长姓名',
          },
        ],

        storeOwnerPic: [
          {
            required: true,
            message: '请输入店主照片',
          },
        ],
        storeManagerPic: [
          {
            required: true,
            message: '请输入店长照片',
          },
        ],
      },
      dialogRecmdProducts: false,
      // 店铺展示show end
      // 租金\收银
      fileTempId: '',
      fileScanningCopy: '',
      formRental: {
        isIcbc: '0',
        businessLicense: '',
        doorwayPic: '',
        frontCard: '',
        backCard: '',
        settlementPic: '',
        storeHallPhoto: '',
        storeNumberPhoto: '',
        dealerIdcertOrContract: '',
      },
      fileTypearr: [],
      userIcbcFilingDTOList: [],
      RentalRules: {
        isIcbc: [
          {
            required: true,
            message: '请选择是否有工行对公账户',
          },
        ],
        frontCard: [
          {
            required: true,
            message: '请输入法人身份证正面照片',
          },
        ],
        backCard: [
          {
            required: true,
            message: '请输入法人身份证背面照片',
          },
        ],
        doorwayPic: [
          {
            required: true,
            message: '请输入门头照片',
          },
        ],
        storeHallPhoto: [
          {
            required: true,
            message: '请上传门店内景照照片',
          },
        ],
        storeNumberPhoto: [
          {
            required: true,
            message: '请上传门牌号照片',
          },
        ],
        businessLicense: [
          {
            required: true,
            message: '请输入营业执照',
          },
        ],
        settlementPic: [
          {
            required: true,
            message: '请输入结算账号照片',
          },
        ],
        fading: [
          {
            required: true,
            message: '请上传法定代表人授权书',
          },
        ],
        xinxi: [
          {
            required: true,
            message: '请上传信息查询使用授权书',
          },
        ],
        shoudan: [
          {
            required: true,
            message: '请上传收单业务书',
          },
        ],
        feijin: [
          {
            required: true,
            message: '请上传法定代表人授权书',
          },
        ],
      },
      RentalPayWay: [],
      // 租金\收银 end

      // 腾讯地图的大版本升级后的参数
      suggestion: '',
      suggestionLoading: false,
      suggestionList: [],
    };
  },
  //   watch: {
  //     dialogVisible: function(currentValue) {
  //       this.showMapComponent = currentValue;

  //       if (currentValue) {
  //         this.keyword = "";
  //       }
  //     }
  //   },
  computed: {
    storeType: () => dict.storeType,
  },
  watch: {
    showModal: function(newValue) {
      if (newValue) {
        this.init();
      }
    },
    // 'formCorp.upOrgSeq': {
    //   handler(newName) {
    //     newName && this.selCore(newName);
    //   },
    //   deep: true,
    //   // immediate: true,
    // },
  },
  async mounted() {
    // console.log(this.$route.params.authCode, 'llll');
    // localStorage.setItem("authCode", this.$route.params.authCode);
    await this._shopAuthdetail();
    await this._getAllZone();
    await this.selCore(this.formCorp.upOrgSeq, true);
    this.init();
    this.rolemanageone();
  },

  methods: {
    changekaishi(v) {
      console.log(v, 'hh');
      this.formShop.value1 = v;
    },
    changejieshu(v) {
      console.log(v, 'hh');
      this.formShop.value2 = v;
    },

    tublur(query) {
      const _this = this;

      if (query) {
        _this.suggestionLoading = true;
        var suggest = new TMap.service.Suggestion({
          pageSize: 10,
          region: `${_this.select.province}${_this.select.city}${_this.select.area}`,
        });

        suggest
          .getSuggestions({
            keyword: query,
          })
          .then((result) => {
            _this.suggestionList = result.data;
          })
          .finally(() => {
            _this.suggestionLoading = false;
          });
      } else {
        _this.suggestionList = [];
      }
    },
    onSelectAddress(value) {
      const curItem = this.suggestionList.find((item) => item.id === value);
      if (curItem) {
        marker && marker.setMap(null);
        marker = null;
        map.setCenter(
          new TMap.LatLng(curItem.location.lat, curItem.location.lng)
        );
        marker = new TMap.MultiMarker({
          map: map,
          geometries: [
            {
              position: new TMap.LatLng(
                curItem.location.lat,
                curItem.location.lng
              ),
            },
          ],
        });
        localStorage.setItem('storeLng', curItem.location.lng);
        localStorage.setItem('storeLat', curItem.location.lat);
        this.clicktu();
        localStorage.setItem('storeAddressDetail', curItem.address);
        this.formShop.storeAddressDetail = curItem.address;
      }
    },
    clicktu() {
      this.formShop.storeLng = localStorage.getItem('storeLng');
      this.formShop.storeLat = localStorage.getItem('storeLat');
    },
    async _shopAuthdetail() {
      this.authCode = localStorage.getItem('authCode');
      let data = {
        authCode: this.authCode,
      };
      await shopAuthdetail(data).then((res) => {
        this.mainuuid = res.result.uuid;
        if (res.result.uuid) {
          this.formCorp.storeName = res.result.storeName;
          this.formCorp.storeType = String(res.result.storeType);
          this.formCorp.upOrgSeq = String(res.result.upOrgSeq);
          this.formCorp.baseCode = String(res.result.baseCode);
          //   this.formCorp.basePersonCode = String(res.result.basePersonCode);
          this.formCorp.baseName = res.result.baseName;
          this.formCorp.managerArea = res.result.managerArea;
          this.formCorp.orderCustomerCode = this.$route.params.v.orderCustomerCode;
          this.formCorp.basePersonName = res.result.basePersonName;
          this.formShop.openDate = res.result.openDate;
          this.formShop.province = res.result.province;
          this.formShop.area = res.result.county;
          this.formShop.city = res.result.city;
          this.select.province = res.result.province;
          this.select.city = res.result.city;
          this.select.area = res.result.county;
          this.formShop.storeAddressDetail = res.result.storeAddressDetail;
          this.formShop.storeLng = res.result.storeLng;
          this.formShop.storeLat = res.result.storeLat;
          localStorage.setItem('storeLng', this.formShop.storeLng);
          localStorage.setItem('storeLat', this.formShop.storeLat);

          this.formShop.companyName = res.result.companyName;
          this.formShop.value1 = res.result.openBeginTime;
          this.formShop.value2 = res.result.openEndTime;

          this.formShopShow.legalPerson = res.result.legalPerson;
          this.formShopShow.legalPersonPhone = res.result.legalPersonPhone;
          this.formShopShow.storeOwnerName = res.result.storeOwnerName;

          this.formShopShow.storeOwnerPhone = res.result.storeOwnerPhone;
          this.formShopShow.storePhone = res.result.storePhone;
          this.formShopShow.storeOwnerGrade = res.result.storeOwnerGrade;
          this.formShopShow.storeManagerPhone = res.result.storeManagerPhone;
          this.formShopShow.storeManagerName = res.result.storeManagerName;
          this.formShopShow.storeOwnerPic = res.result.storeOwnerPic;
          this.formShopShow.storeManagerPic = res.result.storeManagerPic;

          this.formRental.isIcbc = String(res.result.isIcbc);
          this.formRental.businessLicense = res.result.businessLicense;
          this.formRental.doorwayPic = res.result.doorwayPic;
          this.formRental.backCard = res.result.backCard;
          this.formRental.frontCard = res.result.frontCard;
          this.formRental.settlementPic = res.result.settlementPic;

          this.formRental.storeHallPhoto = res.result.storeHallPhoto; //门店内景照照片
          this.formRental.storeNumberPhoto = res.result.storeNumberPhoto; //门牌号照片

          this.userIcbcFilingDTOList = res.result.userIcbcFilingDTOList;
          if (this.formRental.businessLicense) {
            this.imgList.push({
              url: this.formRental.businessLicense,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }
          if (this.formRental.doorwayPic) {
            this.imgListone.push({
              url: this.formRental.doorwayPic,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }

          if (this.formRental.storeHallPhoto) {
            this.imgList13.push({
              url: this.formRental.storeHallPhoto,
              status: 'finished',
            });
          }
          if (this.formRental.storeNumberPhoto) {
            this.imgList15.push({
              url: this.formRental.storeNumberPhoto,
              status: 'finished',
            });
          }
          if (this.formRental.dealerIdcertOrContract) {
            this.imgList16.push({
              url: this.formRental.dealerIdcertOrContract,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }

          if (this.formShopShow.storeOwnerPic) {
            this.imgListtwo.push({
              url: this.formShopShow.storeOwnerPic,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }

          if (this.formShopShow.storeManagerPic) {
            this.imgListthree.push({
              url: this.formShopShow.storeManagerPic,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }
          if (this.formRental.frontCard) {
            this.imgListshenzheng.push({
              url: this.formRental.frontCard,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }
          if (this.formRental.backCard) {
            this.imgListshenfan.push({
              url: this.formRental.backCard,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }

          if (this.formRental.settlementPic) {
            this.imgListjie.push({
              url: this.formRental.settlementPic,
              status: 'finished',
            }); //上传成功之后把值添加到imglist中
          }

          this.userIcbcFilingDTOList.forEach((item, i) => {
            this.fileTypearr.push(this.userIcbcFilingDTOList[i].fileType);
            if (item.fileType == 1) {
              this.fileListfa.push({
                url: item.fileScanningCopy,
                status: 'finished',
              });
            }
            if (item.fileType == 2) {
              this.fileListxin.push({
                url: item.fileScanningCopy,
                status: 'finished',
              });
            }
            if (item.fileType == 3) {
              this.fileListshou.push({
                url: item.fileScanningCopy,
                status: 'finished',
              });
            }
            if (item.fileType == 4) {
              this.fileListfei.push({
                url: item.fileScanningCopy,
                status: 'finished',
              });
            }
            if (item.fileType == 5) {
              this.fileListdui.push({
                url: item.fileScanningCopy,
                status: 'finished',
              });
            }
            if (item.fileType == 6) {
              this.fileListfeizi.push({
                url: item.fileScanningCopy,
                status: 'finished',
              });
            }
            if (item.fileType == 7) {
              this.fileListdan.push({
                url: item.fileScanningCopy,
                status: 'finished',
              });
            }
          });
        } else {
        }
      });
    },
    saveCaogao() {
      //   this.shopAuthdetail();
      this.authCode = localStorage.getItem('authCode');
      let data = {
        authCode: this.authCode,
      };
      shopAuthdetail(data).then((res) => {
        this.mainuuid = res.result.uuid;
        // console.log(this.mainuuid, "908");

        let data = {
          // 选择商户参数
          uuid: this.mainuuid,
          authCode: this.authCode,
          storeName: this.formCorp.storeName,
          storeType: this.formCorp.storeType,

          upOrgSeq: this.formCorp.upOrgSeq,
          baseCode: this.formCorp.baseCode,
          //   basePersonCode: this.formCorp.basePersonCode,
          openDate: this.formShop.openDate,
          managerArea: this.formCorp.managerArea,
          orderCustomerCode: this.formCorp.orderCustomerCode,
          province: this.formShop.province,

          city: this.formShop.city,
          county: this.formShop.area,
          storeAddressDetail: this.formShop.storeAddressDetail,

          storeLng: this.formShop.storeLng,
          storeLat: this.formShop.storeLat,
          companyName: this.formShop.companyName,
          openBeginTime: this.formShop.value1,
          openEndTime: this.formShop.value2,

          legalPerson: this.formShopShow.legalPerson,
          legalPersonPhone: this.formShopShow.legalPersonPhone,
          storeOwnerName: this.formShopShow.storeOwnerName,
          storeOwnerPhone: this.formShopShow.storeOwnerPhone,
          storePhone: this.formShopShow.storePhone,
          storeOwnerGrade: this.formShopShow.storeOwnerGrade,
          storeManagerPhone: this.formShopShow.storeManagerPhone,
          storeManagerName: this.formShopShow.storeManagerName,

          storeOwnerPic: this.formShopShow.storeOwnerPic,
          storeManagerPic: this.formShopShow.storeManagerPic,
          isIcbc: this.formRental.isIcbc,
          businessLicense: this.formRental.businessLicense,

          doorwayPic: this.formRental.doorwayPic,
          storeHallPhoto: this.formRental.storeHallPhoto,
          storeNumberPhoto: this.formRental.storeNumberPhoto,
          dealerIdcertOrContract: this.formRental.dealerIdcertOrContract,

          frontCard: this.formRental.frontCard,
          backCard: this.formRental.backCard,
          settlementPic: this.formRental.settlementPic,
          userIcbcFilingDTOList: this.userIcbcFilingDTOList,
        };

        saveUserReviewInfo(data).then((res) => {
          console.log(res);
          setTimeout(() => {
            this.ccloading = false;
          }, 2000);
          if (res.code == 1) {
            const loading = this.$loading({
              //   lock: true,
              //   text: 'Loading',
              //   spinner: 'el-icon-loading',
              //   background: 'rgba(0, 0, 0, 0.7)'
            });
            setTimeout(() => {
              loading.close();
            }, 2000);
            this.$message({
              message: '保存成功',
              type: 'success',
              center: true,
            });
          } else {
            this.$message({
              message: res.message,
              type: 'error',
              center: true,
            });
          }
        });
      });
      console.log(this.mainuuid, '900');
    },
    handleChangefa(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangexin(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangeshou(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangefei(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangedui(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangefeizi(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangedan(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChange(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');
      //   this.fileScanningCopy=
    },
    download(tempType) {
      console.log(tempType, '999');
      let data = {
        type: tempType,
      };
      queryUserIcbcTemp(data).then((res) => {
        if (tempType == 1 || tempType == 2 || tempType == 3) {
          window.location.href = res.result[0].printUrl;

          var divFrame = window.parent.document.getElementById(
            'downLoadListFrame'
          );
          //判断是否存在，如果存在先移除，再重新创建
          if (divFrame != null) {
            window.parent.document.body.removeChild(divFrame);
          }
          //重新创建
          var iframe = window.parent.document.createElement('iframe');
          iframe.setAttribute('id', 'downLoadListFrame');
          //download_file.id = "downFrame";
          window.parent.document.body.appendChild(iframe);
          divFrame = window.parent.document.getElementById('downLoadListFrame');
          //隐式调用，（注意：window.parent.document 适应对于，farme内部代码，调用frame 外部dom；如果项目未用frame，改写成 document即可）
          window.open(res.result[0].tempUrl);
          divFrame.style.display = 'none';
        } else if (
          tempType == 6 ||
          tempType == 7 ||
          tempType == 4 ||
          tempType == 5
        ) {
          window.open(res.result[0].printUrl, 'one');
          window.open(res.result[0].tempUrl, 'two');
        }
      });
    },
    fileUpload(event) {
      // 上传文件
      console.log(event);

      let file = event.target.files;
      console.log(file, 'kkk');
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', file[0]);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        this.$message({
          message: '保存成功',
          type: 'success',
          center: true,
        });
      });
      uploadFile(formData).then((res) => {
        console.log(res);

        this.$message({
          message: '保存成功',
          type: 'success',
          center: true,
        });
      });
    },
    downloadone(tempType) {
      //   this.fileUpload();
      console.log(tempType, '999');
      this.fileType = tempType;
      let data = {
        type: tempType,
      };
      queryUserIcbcTemp(data).then((res) => {
        this.fileTempId = res.result[0].uuid;
      });
    },

    init() {
      var that = this;
      console.log(that.formShop.storeLng, 'kjuu');
      console.log(localStorage.getItem('storeLng'), 'lll99');
      console.log(localStorage.getItem('storeLat'), 'lll99');
      if (
        localStorage.getItem('storeLat') == '' ||
        localStorage.getItem('storeLat') == null ||
        localStorage.getItem('storeLng') == '' ||
        localStorage.getItem('storeLng') == null
      ) {
        console.log('op0009');
        map = new TMap.Map(document.getElementById('container'), {
          center: new TMap.LatLng(28.80807357698725, 104.59505796432495),
          minZoom: 15, //此处设置地图的缩放级别  最小值是6
          maxZoom: 50,
          zoom: 17,
        });
      } else {
        map = new TMap.Map(document.getElementById('container'), {
          center: new TMap.LatLng(
            localStorage.getItem('storeLat'),
            localStorage.getItem('storeLng')
          ),
          minZoom: 15, //此处设置地图的缩放级别  最小值是6
          maxZoom: 50,
          zoom: 17,
        });
        var myLatlng = new TMap.LatLng(
          localStorage.getItem('storeLat'),
          localStorage.getItem('storeLng')
        );
        marker = new TMap.MultiMarker({
          map: map,
        });
        marker.add({
          position: myLatlng,
        });
        that.markersArray.push(marker);
      }
      map.on('click', function(evt) {
        var geocoder = new TMap.service.Geocoder();
        geocoder.getAddress({ location: evt.latLng }).then((res) => {
          localStorage.setItem('storeAddressDetail', res.result.address);
          that.formShop.storeAddressDetail = res.result.address;
        });
        marker && marker.setMap(null);
        marker = null;
        marker = new TMap.MultiMarker({
          map: map,
        });
        if (marker) {
          marker.add({
            position: evt.latLng,
          });
        }
        localStorage.setItem('storeLng', evt.latLng.getLng());
        localStorage.setItem('storeLat', evt.latLng.getLat());
        that.clicktu();
      });
    },

    onSelected(data) {
      console.log('ppp', data);

      this.formShop.province = data.province.value;
      this.formShop.city = data.city.value;
      this.formShop.area = data.area.value;
      console.log(
        this.formShop.province,
        this.formShop.city,
        this.formShop.area,
        'ppp'
      );
      //   this.address.county = data.area.value;
    },
    goback() {
      this.$router.push('/login');
    },
    handleRemove(file, fileList) {
      this.formRental.businessLicense = '';
      console.log(file, fileList);
      console.log(this.userIcbcFilingDTOList, '78999');
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 8) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, '78111');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgList = newfileList;
    },

    handleRemove13(file, fileList) {
      this.formRental.storeHallPhoto = '';
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 13) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, 'ii9955');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgList13 = newfileList;
    },

    handleRemove15(file, fileList) {
      this.formRental.storeNumberPhoto = '';
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 15) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, 'ii9955');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgList15 = newfileList;
    },

    handleRemove16(file, fileList) {
      this.formRental.dealerIdcertOrContract = '';
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 16) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, 'ii9955');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgList16 = newfileList;
    },

    handleRemoveone(file, fileList) {
      this.formRental.doorwayPic = '';
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 9) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, 'ii9955');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListone = newfileList;
    },
    handleRemovejie(file, fileList) {
      this.formRental.settlementPic = '';
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 12) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, '8899');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListjie = newfileList;
    },

    handleRemovefa(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 1),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 1) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListfa = newfileList;
    },
    handleRemovexin(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 2),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 2) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListxin = newfileList;
    },
    handleRemoveshou(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 3),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 3) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListshou = newfileList;
    },
    handleRemovefei(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 4),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 4) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListfei = newfileList;
    },
    handleRemovedui(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 5),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 5) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListdui = newfileList;
    },

    handleRemovefeizi(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 6),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 6) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListfeizi = newfileList;
    },
    handleRemovedan(file, fileList) {
      console.log(this.userIcbcFilingDTOList, '5559');
      console.log(file, fileList);
      //   this.fileTypearr.splice(7, 1)

      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 7),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 7) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListdan = newfileList;
    },
    handleRemoveshenfan(file, fileList) {
      this.formRental.backCard = '';
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 11) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListshenfan = newfileList;
    },
    handleRemoveshenzheng(file, fileList) {
      this.formRental.frontCard = '';
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 10) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListshenzheng = newfileList;
    },
    handleRemovetwo(file, fileList) {
      this.formShopShow.storeOwnerPic = '';
      console.log(file, fileList);
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListtwo = newfileList;
    },
    handleRemovethree(file, fileList) {
      this.formShopShow.storeManagerPic = '';
      console.log(file, fileList);
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListthree = newfileList;
    },
    beforeAvatarUpload(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgList, 'opo99');
        this.imgList = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgList = [];
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },

    beforeAvatarUploadone(file) {
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgListone, 'opo99');
        this.imgListone = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgListone = [];
      }
      return isLt2M && isLt2M;
    },

    beforeAvatarUpload13(file) {
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgList13, 'opo99');
        this.imgList13 = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgList13 = [];
      }
      return isLt2M && isLt2M;
    },
    beforeAvatarUpload15(file) {
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgList15, 'opo99');
        this.imgList15 = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgList15 = [];
      }
      return isLt2M && isLt2M;
    },
    beforeAvatarUpload16(file) {
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgList16, 'opo99');
        this.imgList16 = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgList16 = [];
      }
      return isLt2M && isLt2M;
    },

    beforeAvatarUploadjie(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgListjie, 'opo99');
        this.imgListjie = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgListjie = [];
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadshenfan(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgListshenfan, 'opo99');
        this.imgListshenfan = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgListshenfan = [];
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadshenzheng(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgListshenzheng, 'opo99');
        this.imgListshenzheng = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgListshenzheng = [];
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadtwo(file) {
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgListtwo, 'opo99');
        this.imgListtwo = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgListtwo = [];
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadthree(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = testmsg === 'jpg';
      const extension2 = testmsg === 'png';
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 jpg、png格式!',
          type: 'warning',
        });
        console.log(this.imgListthree, 'opo99');
        this.imgListthree = [];
      }
      if (!isLt2M) {
        this.$message({
          message: '上传图片大小不得超过30MB!',
          type: 'warning',
        });

        this.imgListthree = [];
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },

    getMsgFormSon(data) {
      console.log(data, '666');
    },

    // getlocation() {
    //   this.showMapComponent = true;
    //   this.init();
    // },
    async _getAllZone() {
      await getAllZone().then((res) => {
        this.corpList = res.result;
      });
    },

    selCore(value, isInit) {
      let data = {
        code: value,
      };
      !isInit && (this.formCorp.baseCode = '');
      getAllBase(data).then((res) => {
        this.RentalPayWay = res.result;
      });
    },
    // parentFn(childData) {
    //   this.message = childData;
    //   console.log("kjk");
    // },
    selbase(value) {
      this.formCorp.baseCode = value;
      let data = {
        orgSeq: value,
      };
      getBaseUserInfo(data).then((res) => {
        this.Renarr = res.result;
      });
    },
    // selbasePerson(value) {
    //   console.log(value, "kkuuw");
    //   this.formCorp.basePersonCode = value;
    // },
    handleImgChange(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgList.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgList, 'llloo');
      }
    },
    handleImgChangeone(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListone.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListone, 'llloo');
      }
    },

    handleImgChange13(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgList13.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListone, 'llloo');
      }
    },
    handleImgChange15(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgList15.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListone, 'llloo');
      }
    },
    handleImgChange16(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgList16.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListone, 'llloo');
      }
    },

    handleImgChangejie(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListjie.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListjie, 'llloo');
      }
    },
    handleImgChangeshenfan(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListshenfan.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListshenfan, 'llloo');
      }
    },
    handleImgChangeshenzheng(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListshenzheng.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListshenzheng, 'llloo');
      }
    },
    handleImgChangetwo(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListtwo.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListtwo, 'llloo');
      }
    },
    handleImgChangethree(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListthree.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListthree, 'llloo');
      }
    },
    handleCheckAllWeekChange(val) {
      var week = [1, 2, 3, 4, 5, 6, 0];
      this.formShop.shopHours = val ? week : [];
      this.isIndeterminate = false;
    },
    // 单选
    handleCheckedWeekChange(value) {
      var checkedCount = value.length;
      this.checkAllWeek = checkedCount === this.week.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.week.length;
    },
    // 店铺信息 end
    // 展示信息
    addType() {
      this.formShopShow.shopPhotos.push({
        id: '',
        fileType: '',
        label: '',
        labelOrdinal: '',
        ordinal: '',
        url: '',
      });
    },
    delType(index) {
      if (this.formShopShow.shopPhotos.length > 1) {
        this.formShopShow.shopPhotos.splice(index, 1);
      }
    },

    addRecmdProducts() {
      var index = 1;
      this.dialogRecmdProducts = false;
      this.formShopShow.recmdProducts.push({
        id: ++index,
        productId: '',
        productName: this.formShopShow.productName,
        introduction: this.formShopShow.introduction,
        ordinal: '',
        url: '',
      });
    },

    addProduct() {
      this.dialogRecmdProducts = true;
      this.formShopShow.productName = '';
      this.formShopShow.introduction = '';
    },
    handleClose() {
      this.dialogRecmdProducts = false;
    },
    edit(item) {
      this.dialogRecmdProducts = true;
    },
    deleteX(item) {
      this.$confirm('是否删除').then(() => {});
    },

    handlePictureCardPreview(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl = file.url;
      this.dialogVisible1 = true;
    },
    handlePictureCardPreview1(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl1 = file.url;
      this.dialogVisible2 = true;
    },

    handlePictureCardPreview13(file) {
      this.dialogImageUrl13 = file.url;
      this.dialogVisible13 = true;
    },
    handlePictureCardPreview15(file) {
      this.dialogImageUrl15 = file.url;
      this.dialogVisible15 = true;
    },
    handlePictureCardPreview16(file) {
      this.dialogImageUrl16 = file.url;
      this.dialogVisible16 = true;
    },

    handlePictureCardPreviewjie(file) {
      console.log(file, 'ooo');
      this.dialogImageUrljie = file.url;
      this.dialogVisiblejie = true;
    },
    handlePictureCardPreviewshenfan(file) {
      console.log(file, 'ooo');
      this.dialogImageUrlshenfan = file.url;
      this.dialogVisibleshenfan = true;
    },
    handlePictureCardPreviewshenzheng(file) {
      console.log(file, 'ooo');
      this.dialogImageUrlshenzheng = file.url;
      this.dialogVisibleshenzheng = true;
    },
    handlePictureCardPreview2(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl2 = file.url;
      this.dialogVisible3 = true;
    },
    handlePictureCardPreview3(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl3 = file.url;
      this.dialogVisible4 = true;
    },
    upLoadPic(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrl = file.result;
      this.formRental.businessLicense = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);
        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")
          this.userIcbcFilingDTOList.push({
            fileType: 8,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
      console.log(this.userIcbcFilingDTOList, '7878787');
      //   this.submitForm("formCorp");
    },

    upLoadPic13(file, fileList) {
      this.dialogImageUrl13 = file.result;
      this.formRental.storeHallPhoto = file.result;
      let formData = new FormData();
      formData.append('file', fileList.raw);
      uploadFile(formData).then((res) => {
        console.log(res);
        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          console.log('13');
          this.userIcbcFilingDTOList.push({
            fileType: 13,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },

    upLoadPic15(file, fileList) {
      this.dialogImageUrl15 = file.result;
      this.formRental.storeNumberPhoto = file.result;
      let formData = new FormData();
      formData.append('file', fileList.raw);
      uploadFile(formData).then((res) => {
        console.log(res);
        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          console.log('15');
          this.userIcbcFilingDTOList.push({
            fileType: 15,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },

    upLoadPic16(file, fileList) {
      this.dialogImageUrl16 = file.result;
      this.formRental.dealerIdcertOrContract = file.result;
      let formData = new FormData();
      formData.append('file', fileList.raw);
      uploadFile(formData).then((res) => {
        console.log(res);
        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          console.log('16');
          this.userIcbcFilingDTOList.push({
            fileType: 16,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },

    upLoadPicone(file, fileList) {
      this.dialogImageUrl1 = file.result;
      this.formRental.doorwayPic = file.result;
      let formData = new FormData();
      formData.append('file', fileList.raw);
      uploadFile(formData).then((res) => {
        console.log(res);
        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")
          this.userIcbcFilingDTOList.push({
            fileType: 9,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicjie(file, fileList) {
      console.log(this.userIcbcFilingDTOList, 'o88');
      this.dialogImageUrljie = file.result;
      this.formRental.settlementPic = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")
          this.userIcbcFilingDTOList.push({
            fileType: 12,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicfa(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(1);
      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")
          this.userIcbcFilingDTOList.push({
            fileTempId: this.fileTempId,
            fileType: 1,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicxin(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(2);
      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")
          this.userIcbcFilingDTOList.push({
            fileTempId: this.fileTempId,
            fileType: 2,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicshou(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(3);
      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")
          this.userIcbcFilingDTOList.push({
            fileTempId: this.fileTempId,
            fileType: 3,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicfei(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(4);
      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")

          this.userIcbcFilingDTOList.push({
            fileTempId: this.fileTempId,
            fileType: 4,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicdui(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(5);
      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")

          this.userIcbcFilingDTOList.push({
            fileTempId: this.fileTempId,
            fileType: 5,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicfeizi(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(6);
      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")

          this.userIcbcFilingDTOList.push({
            fileTempId: this.fileTempId,
            fileType: 6,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicdan(file, fileList) {
      console.log(file, fileList, 'popo88');
      console.log(this.userIcbcFilingDTOList, '5533');
      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(7);
      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")

          this.userIcbcFilingDTOList.push({
            fileTempId: this.fileTempId,
            fileType: 7,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicshenfan(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrlshenfan = file.result;
      this.formRental.backCard = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")

          this.userIcbcFilingDTOList.push({
            fileType: 11,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除�����件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPicshenzheng(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrlshenzheng = file.result;
      this.formRental.frontCard = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        if (
          res.result &&
          res.result !== '' &&
          res.result !== null &&
          res.code == 1
        ) {
          //   console.log("9")

          this.userIcbcFilingDTOList.push({
            fileType: 10,
            fileScanningCopy: file.result,
            icbckey: res.result,
            status: 1,
          });
          this.isnum = 0;
        } else {
          // this.$message({
          //   message: '银行信息提交失败请删除文件重试！',
          //   type: 'error',
          //   center: true,
          // });
          // this.isnum = 1;
        }
      });
    },
    upLoadPictwo(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrl2 = file.result;
      this.formShopShow.storeOwnerPic = file.result;
    },
    upLoadPicthree(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrl3 = file.result;
      this.formShopShow.storeManagerPic = file.result;
    },
    //验证表单信息
    submitForm(formName, success) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          //通过进入下一步
          this.active += 1;
          success && success();
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },

    postFormAjax() {
      //   this.$refs[formCorp].validate(valid => {
      //     if (valid) {
      setTimeout(() => {
        this.loading = false;
      }, 2000);

      if (this.formCorp.storeName == '' || this.formCorp.storeName == null) {
        this.$message.error('请输入店铺名称');
        return;
      }

      if (this.formCorp.storeType == '' || this.formCorp.storeType == null) {
        this.$message.error('请选择店铺类型');
        return;
      }
      if (this.formCorp.upOrgSeq == '' || this.formCorp.upOrgSeq == null) {
        this.$message.error('请选择所属大区');
        return;
      }
      if (this.formCorp.baseCode == '' || this.formCorp.baseCode == null) {
        this.$message.error('请选择所属营销区域');
        return;
      }
      if (
        this.formCorp.managerArea == '' ||
        this.formCorp.managerArea == null
      ) {
        this.$message.error('请输入经营面积');
        return;
      }
      if (
        this.formCorp.orderCustomerCode == '' ||
        this.formCorp.orderCustomerCode == null
      ) {
        this.$message.error('请输入订单客户编号');
        return;
      }
      if (this.formShop.openDate == '' || this.formShop.openDate == null) {
        this.$message.error('请填写开业日期');
        return;
      }
      if (this.formShop.province == '' || this.formShop.province == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (this.formShop.city == '' || this.formShop.city == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (this.formShop.area == '' || this.formShop.area == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (
        this.formShop.storeAddressDetail == '' ||
        this.formShop.storeAddressDetail == null
      ) {
        this.$message.error('请输入店铺详细地址');
        return;
      }
      if (this.formShop.storeLng == '' || this.formShop.storeLng == null) {
        this.$message.error('请输入经度');
        return;
      }
      if (this.formShop.storeLat == '' || this.formShop.storeLat == null) {
        this.$message.error('请输入纬度');
        return;
      }
      if (
        this.formShop.companyName == '' ||
        this.formShop.companyName == null
      ) {
        this.$message.error('请输入经销商名');
        return;
      }
      if (this.formShop.value1 == '' || this.formShop.value1 == null) {
        this.$message.error('请输入营业时间');
        return;
      }
      if (this.formShop.value2 == '' || this.formShop.value2 == null) {
        this.$message.error('请输入营业时间');
        return;
      }
      if (
        this.formShopShow.legalPerson == '' ||
        this.formShopShow.legalPerson == null
      ) {
        this.$message.error('请输入法人');
        return;
      }
      if (
        this.formShopShow.legalPersonPhone == '' ||
        this.formShopShow.legalPersonPhone == null
      ) {
        this.$message.error('请输入法人手机号');
        return;
      }

      if (
        this.formShopShow.storeOwnerName == '' ||
        this.formShopShow.storeOwnerName == null
      ) {
        this.$message.error('请输入店主姓名');
        return;
      }
      if (
        this.formShopShow.storeOwnerPhone == '' ||
        this.formShopShow.storeOwnerPhone == null
      ) {
        this.$message.error('请输入店主手机号');
        return;
      }
      if (
        this.formShopShow.storePhone == '' ||
        this.formShopShow.storePhone == null
      ) {
        this.$message.error('请输入店铺电话');
        return;
      }
      if (
        this.formShopShow.storeManagerName == '' ||
        this.formShopShow.storeManagerName == null
      ) {
        this.$message.error('请输入店长姓名');
        return;
      }
      if (
        this.formShopShow.storeManagerPhone == '' ||
        this.formShopShow.storeManagerPhone == null
      ) {
        this.$message.error('请输入店长电话');
        return;
      }

      if (
        this.formShopShow.storeOwnerPic == '' ||
        this.formShopShow.storeOwnerPic == null
      ) {
        this.$message.error('请输入店主照片');
        return;
      }

      if (
        this.formShopShow.storeManagerPic == '' ||
        this.formShopShow.storeManagerPic == null
      ) {
        this.$message.error('请输入店长照片');
        return;
      }

      if (this.formRental.isIcbc == '' || this.formRental.isIcbc == null) {
        this.$message.error('是否有工行对公账户');
        return;
      }
      if (
        this.formRental.businessLicense == '' ||
        this.formRental.businessLicense == null
      ) {
        this.$message.error('请输入营业执照');
        return;
      }
      if (
        this.formRental.doorwayPic == '' ||
        this.formRental.doorwayPic == null
      ) {
        this.$message.error('请输入专卖店门头图片');
        return;
      }

      if (
        this.formRental.storeHallPhoto == '' ||
        this.formRental.storeHallPhoto == null
      ) {
        this.$message.error('请上传门店内景照图片');
        return;
      }
      if (
        this.formRental.storeNumberPhoto == '' ||
        this.formRental.storeNumberPhoto == null
      ) {
        this.$message.error('请上传门牌号照片');
        return;
      }

      if (
        this.formRental.frontCard == '' ||
        this.formRental.frontCard == null
      ) {
        this.$message.error('请输入法人身份证正面照片');
        return;
      }
      if (this.formRental.backCard == '' || this.formRental.backCard == null) {
        this.$message.error('请输入法人身份证背面照片');
        return;
      }
      if (
        this.formRental.settlementPic == '' ||
        this.formRental.settlementPic == null
      ) {
        this.$message.error('请输入结算账号照片');
        return;
      }
      if (this.icbcstatus == 0) {
        //   this.userIcbcFilingDTOList.forEach((item,i)=>{
        //      this.fileTypearr.push(this.userIcbcFilingDTOList[i].fileType);
        //      console.log( this.fileTypearr,"oioi")

        //   })
        console.log(this.fileTypearr, 'oioirr');
        if (this.fileTypearr.indexOf(1) == -1) {
          this.$message.error('请上传法定代表人授权书');
          return;
        }
        if (this.fileTypearr.indexOf(2) == -1) {
          this.$message.error('请上传信息查询使用授权书');
          return;
        }
        if (this.fileTypearr.indexOf(3) == -1) {
          this.$message.error('请上传收单业务书');
          return;
        }
        // if (this.isnum == 1) {
        //   this.$message.error('工行建档信息存在上传银行失败的文件！');
        //   return;
        // }
      } else if (this.icbcstatus == 1) {
        //  this.userIcbcFilingDTOList.forEach((item,i)=>{
        //          this.fileTypearr.push(this.userIcbcFilingDTOList[i].fileType);
        //          console.log( this.fileTypearr,"oioi")

        //       })
        console.log(this.fileTypearr, 'oioirr');
        if (this.fileTypearr.indexOf(1) == -1) {
          this.$message.error('请上传法定���表人授权书');
          return;
        }
        if (this.fileTypearr.indexOf(2) == -1) {
          this.$message.error('请上传信息查询使用授权书');
          return;
        }
        if (this.fileTypearr.indexOf(3) == -1) {
          this.$message.error('请上传收单业务书');
          return;
        }
        // if (this.isnum == 1) {
        //   this.$message.error('工行建档信息存在上传银行失败的文件！');
        //   return;
        // }
      }
      console.log('op8888');
      this.authCode = localStorage.getItem('authCode');
      let data = {
        // 选择商户参数
        uuid: this.mainuuid,
        authCode: this.authCode,
        storeName: this.formCorp.storeName,
        storeType: this.formCorp.storeType,

        buildingArea: this.formCorp.buildingArea,
        practicalArea: this.formCorp.practicalArea,
        leaseholdArea: this.formCorp.leaseholdArea,
        warehouseArea: this.formCorp.warehouseArea,
        leaseholdArea: this.formCorp.leaseholdArea,

        upOrgSeq: this.formCorp.upOrgSeq,
        baseCode: this.formCorp.baseCode,
        // basePersonCode: this.formCorp.basePersonCode,
        managerArea: this.formCorp.managerArea,
        orderCustomerCode: this.formCorp.orderCustomerCode,
        openDate: this.formShop.openDate,

        province: this.formShop.province,
        city: this.formShop.city,
        county: this.formShop.area,
        storeAddressDetail: this.formShop.storeAddressDetail,

        storeLng: this.formShop.storeLng,
        storeLat: this.formShop.storeLat,
        companyName: this.formShop.companyName,
        openBeginTime: this.formShop.value1,
        openEndTime: this.formShop.value2,

        legalPerson: this.formShopShow.legalPerson,
        legalPersonPhone: this.formShopShow.legalPersonPhone,
        storeOwnerName: this.formShopShow.storeOwnerName,
        storeOwnerPhone: this.formShopShow.storeOwnerPhone,
        storePhone: this.formShopShow.storePhone,
        storeOwnerGrade: this.formShopShow.storeOwnerGrade,
        storeManagerPhone: this.formShopShow.storeManagerPhone,
        storeManagerName: this.formShopShow.storeManagerName,

        storeOwnerPic: this.formShopShow.storeOwnerPic,
        storeManagerPic: this.formShopShow.storeManagerPic,

        isIcbc: this.formRental.isIcbc,
        businessLicense: this.formRental.businessLicense,
        doorwayPic: this.formRental.doorwayPic,

        storeHallPhoto: this.formRental.storeHallPhoto,
        storeNumberPhoto: this.formRental.storeNumberPhoto,
        dealerIdcertOrContract: this.formRental.dealerIdcertOrContract,

        frontCard: this.formRental.frontCard,
        backCard: this.formRental.backCard,
        settlementPic: this.formRental.settlementPic,
        userIcbcFilingDTOList: this.userIcbcFilingDTOList,
      };
      console.log(data);
      this.$confirm('确认提交审核吗？').then(() => {
        applyShop(data).then((res) => {
          console.log(res);

          if (res.code == 1) {
            //   const loading = this.$loading({
            //   lock: true,
            //   text: 'Loading',
            //   spinner: 'el-icon-loading',
            //   background: 'rgba(0, 0, 0, 0.7)'
            // });
            // setTimeout(() => {
            //   loading.close();
            // }, 2000);
            this.$message({
              message: '提交成功',
              type: 'success',
              center: true,
            });
            this.$router.push('/applystep');
          } else {
            this.$message({
              message: res.message,
              type: 'error',
              center: true,
            });
          }
          //   this.flagtong = false;
          //   this.tongguo = true;
        });
      });
      //   } else {
      //     console.log("error submit!!");
      //     return false;
      //   }
      // });
    },
    changeisIcbc(v) {
      console.log(v, 'ii9');
      this.icbcstatus = v;
      if (v == 0) {
        this.RentalRules.fading[0].required = true;
        this.RentalRules.xinxi[0].required = true;
        this.RentalRules.shoudan[0].required = true;
        this.RentalRules.feijin[0].required = true;
        this.RentalRules.duigong[0].required = true;
        this.RentalRules.feizi[0].required = true;
        this.RentalRules.danwei[0].required = true;
      } else if (v == 1) {
        this.RentalRules.fading[0].required = true;
        this.RentalRules.xinxi[0].required = true;
        this.RentalRules.shoudan[0].required = true;
        this.RentalRules.feijin[0].required = false;
        this.RentalRules.duigong[0].required = false;
        this.RentalRules.feizi[0].required = false;
        this.RentalRules.danwei[0].required = false;
      }
    },
    // goback(){
    //     this.$router.push("/shopArchives")
    // },
    kong() {
      this.formInline.realName = '';
      this.formInline.tel = '';
    },
    creatoneOrg() {
      this.dialogVisibleorg = !this.dialogVisibleorg;
      this.shopname = '店员照片';
      this.ruleForm.realName = '';
      this.ruleForm.onboardDate = '';
      this.ruleForm.workYear = '';
      this.ruleForm.academic = '';
      this.ruleForm.tel = '';
      this.ruleForm.status = '';
      this.ruleForm.headPicUrl = '';
      this.ruleForm.idCard = '';
      this.ruleForm.sex = '';
      this.ruleForm.isFullTime = '';
      this.flagorg = true;
      this.imgListone = [];
      this.imgListoneyuan = [];
      console.log(this.flagorg, 'lo');
    },
    changeorg(v) {
      this.xiugairenTel = v.tel;
      this.ruleForm.isFullTime = v.isFullTime.toString();
      if (v.userType == 5) {
        this.flagdianone = true;
        this.shopname = '店长照片';
      } else {
        this.flagdianone = false;
        this.shopname = '店员照片';
      }
      (this.userType = v.userType),
        (this.ruleForm.realName = v.realName),
        (this.ruleForm.onboardDate = v.onboardDate),
        (this.ruleForm.workYear = String(v.workYear)),
        (this.ruleForm.academic = String(v.academic)),
        (this.ruleForm.tel = v.tel),
        (this.ruleForm.idCard = v.idCard),
        (this.ruleForm.sex = String(v.sex)),
        (this.ruleForm.status = String(v.status)),
        (this.ruleForm.headPicUrl = v.headPicUrl);
      this.userId = v.userId;
      this.uuidyuan = v.uuid;
      this.dialogVisibleorg = !this.dialogVisibleorg;
      this.flagorg = false;
      var headPicUrl = v.headPicUrl;

      this.imgListoneyuan = [];
      if (v.headPicUrl != '' && v.headPicUrl != null) {
        let data = {
          name: '',
          url: v.headPicUrl,
        };
        this.imgListoneyuan.push(data);
      }
      if (this.ruleForm.sex == 'null') {
        this.ruleForm.sex = '';
      }
      if (this.ruleForm.academic == 'null') {
        this.ruleForm.academic = '';
      }
    },
    confirmEditone() {
      if (this.ruleForm.realName == '' || this.ruleForm.realName == null) {
        this.$message.error('请输入店员姓名');
        return;
      }
      if (
        this.ruleForm.onboardDate == '' ||
        this.ruleForm.onboardDate == null
      ) {
        this.$message.error('请输入上岗日期');
        return;
      }

      if (this.ruleForm.sex == '' || this.ruleForm.sex == null) {
        this.$message.error('请选择性别');
        return;
      }

      if (this.ruleForm.academic == '' || this.ruleForm.academic == null) {
        this.$message.error('请选择学历');
        return;
      }

      if (this.ruleForm.isFullTime == '' || this.ruleForm.isFullTime == null) {
        this.$message.error('请选择是否专职');
        return;
      }

      if (this.ruleForm.workYear == '' || this.ruleForm.workYear == null) {
        this.$message.error('请输入工作年限');
        return;
      }
      if (this.ruleForm.tel == '' || this.ruleForm.tel == null) {
        this.$message.error('请输入手机号');
        return;
      } else {
        if (
          !/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/.test(
            this.ruleForm.tel
          )
        ) {
          this.$message.error('请输入正确的手机号');
          return;
        }
      }
      if (this.ruleForm.idCard == '' || this.ruleForm.idCard == null) {
        this.$message.error('请输入身份证号');
        return;
      } else {
        if (
          !/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(
            this.ruleForm.idCard
          )
        ) {
          this.$message.error('请输入正确的身份证号');
          return;
        }
      }

      if (this.ruleForm.status == '' || this.ruleForm.status == null) {
        this.$message.error('请选择状态');
        return;
      }
      if (this.ruleForm.headPicUrl == '' || this.ruleForm.headPicUrl == null) {
        this.$message.error('请上传图片');
        return;
      }

      console.log(this.flagorg, '888999');
      if (this.flagorg == false) {
        /* 修改的时候判断手机号是否重复  this.ruleForm.tel  只判断当前页面手机号 tableData */
        var flagPhone = false;
        this.tableData.forEach((item) => {
          if (
            item.tel == this.ruleForm.tel &&
            this.ruleForm.tel != this.xiugairenTel
          ) {
            flagPhone = true;
            console.log('手机号重复!');
            this.$message({
              showClose: true,
              message: '手机号已经使用,请更换手机号！',
              type: 'error',
            });
          }
        });
        if (flagPhone) {
          return;
        }
        /*  --------end------------------ */

        let data = {
          userType: this.userType,
          authCode: this.authCode,
          orgSeq: this.orgSeq,
          realName: this.ruleForm.realName,
          onboardDate: this.ruleForm.onboardDate,
          workYear: this.ruleForm.workYear,
          academic: this.ruleForm.academic,
          tel: this.ruleForm.tel,
          status: this.ruleForm.status,
          idCard: this.ruleForm.idCard,
          sex: this.ruleForm.sex,
          headPicUrl: this.ruleForm.headPicUrl,
          userId: this.userId,
          uuid: this.uuidyuan,
          isFullTime: this.ruleForm.isFullTime,
        };
        console.log('ioippp');

        reviewClerkUpdate(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'success',
            });
            this.dialogVisibleorg = !this.dialogVisibleorg;
            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      } else if (this.flagorg == true) {
        //修改
        /*  新增的时候判断手机号是否重复  this.ruleForm.tel  只判断当前页面手机号 tableData */
        var flagPhone = false;
        this.tableData.forEach((item) => {
          if (item.tel == this.ruleForm.tel) {
            flagPhone = true;
            console.log('手机号重复!');
            this.$message({
              showClose: true,
              message: '手机号已经使用,请更换手机号！',
              type: 'error',
            });
          }
        });
        if (flagPhone) {
          return;
        }
        /*  --------end------------------ */

        console.log('ioio');
        let data = {
          userType: '6',
          orgSeq: this.orgSeq,
          authCode: this.authCode,
          realName: this.ruleForm.realName,
          onboardDate: this.ruleForm.onboardDate,
          workYear: this.ruleForm.workYear,
          academic: this.ruleForm.academic,
          tel: this.ruleForm.tel,
          status: this.ruleForm.status,
          idCard: this.ruleForm.idCard,
          sex: this.ruleForm.sex,
          headPicUrl: this.ruleForm.headPicUrl,
          isFullTime: this.ruleForm.isFullTime,
        };
        reviewClerkUpdate(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'success',
            });
            this.dialogVisibleorg = !this.dialogVisibleorg;
            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      }
    },

    search() {
      this.listQuery.current = 1;
      let data = {
        size: this.listQuery.size,
        current: this.listQuery.current,
        condition: {
          realName: this.formInline.realName,
          workYear: this.formInline.workYear,
          academic: this.formInline.academic,
          idCard: this.formInline.idCard,
          employeeNo: this.formInline.employeeNo,
          status: this.formInline.status,
          sex: this.formInline.sex,
          authCode: this.authCode,
          // orgSeq: this.orgSeq,
          tel: this.formInline.tel,
        },
      };
      qryReviewClerk(data).then((res) => {
        this.total = res.total;
        this.tableData = res.records || [];
      });
    },
    indexMethod(index) {
      let curpage = this.listQuery.current; //单前页码，具体看组件取值
      let limitpage = this.listQuery.size; //每页条数，具体是组件取值
      return index + 1 + (curpage - 1) * limitpage;
    },
    handledelete(v) {
      let data = {
        uuid: v.uuid,
        userId: v.userId,
      };
      console.log('ioippp');
      this.$confirm('确认删除吗？').then((_) => {
        reviewClerkDelete(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: '删除成功',
              type: 'success',
            });

            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      });
    },

    updateStatus(uuid, userId, status, userType) {
      this.userType = userType;
      let data = {
        orgSeq: this.orgSeq,
        userType: this.userType,
        status: status,
        uuid: uuid,
        userId: userId,
      };
      console.log('ioippp');
      this.$confirm('确认此操作吗？').then((_) => {
        reviewClerkUpdate(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: '操作成功',
              type: 'success',
            });

            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      });
    },
    handleSizeChange(val) {
      this.listQuery.size = val;
      this.rolemanageone();
    },
    handleCurrentChange(val) {
      this.listQuery.current = val;
      this.rolemanageone();
    },

    rolemanageone() {
      // this.logininfo = localStorage.getItem("logininfo");
      // this.orgList = JSON.parse(this.logininfo).orgList;
      // this.orgSeq = this.$route.params.orgSeq
      // console.log(this.$route.params.orgSeq, "ioio00");
      let data = {
        size: this.listQuery.size,
        current: this.listQuery.current,
        condition: {
          realName: this.formInline.realName,
          workYear: this.formInline.workYear,
          academic: this.formInline.academic,
          idCard: this.formInline.idCard,
          employeeNo: this.formInline.employeeNo,

          sex: this.formInline.sex,
          authCode: this.authCode,
          // orgSeq: this.orgSeq,
          tel: this.formInline.tel,
        },
      };
      qryReviewClerk(data).then((res) => {
        this.loading = false;
        this.total = res.total;
        this.tableData = res.records || [];
        console.log(this.tableData, 'ppe');
      });
    },

    handlePictureCardPreviewyuan(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisibleImg = true;
    },
    upLoadPiconeyuan(file, fileList) {
      this.imgListoneyuan = [];
      this.ruleForm.headPicUrl = file.result;
    },
    handleImgChangeoneyuan(file, fileList) {
      if (file.response) {
        this.imgListoneyuan.push({
          url: file.response.result,
          status: 'finished',
        });
      }
    },

    handleImgChangetwo(file, fileList) {
      if (file.response) {
        this.imgListtwo.push({
          url: file.response.result,
          status: 'finished',
        });
      }
    },

    handleExceed(file, fileList6) {
      this.$message.warning(`图片最多上传1张，请先删除后再上传`);
    },
  },
};
</script>

<style lang="scss" scoped>
.el-form-item /deep/ .el-upload--picture-card {
  width: 100px;

  height: 100px;
}

.el-upload-list--picture-card /deep/.el-upload-list__item {
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #c0ccda;
  border-radius: 6px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  margin: 0 8px 8px 0;
  display: inline-block;
}

.el-form-item /deep/ .el-upload {
  width: 100px;

  height: 100px;

  line-height: 100px;
}

/deep/ .el-input--suffix .el-input__inner {
  padding-right: 0px;
  font-size: 12px;
}

.el-form-item /deep/ .avatar {
  width: 100px;

  height: 100px;

  display: block;
}

#add-cater-merchants {
  h2 {
    font-size: 24px;
    font-weight: 700;
    padding-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgb(230, 231, 235);
  }

  .container {
    margin-top: 10px;
  }

  .el-input--medium .el-input__inner {
    height: auto !important;
  }

  .idcard {
    display: flex;
  }

  .idcard div {
    margin: 10px;
  }

  .bussLicPhoto {
    display: flex;
  }

  .bussLicPhoto div {
    margin: 5px;
    text-align: center;
  }
}

#add-cater-merchants.route-page {
  background: #fff;
  width: 76%;
  padding: 3% 0;
  margin: 0 auto;
  border: 2px #ccc dashed;
  margin-top: 2%;
}

.xizai {
  float: left;
  padding: 9px 15px;
  color: #fff;
  background-color: #409eff;
  border-color: #409eff;
  font-size: 12px;
  border-radius: 3px;
  margin-top: 11px;
  margin-right: 100px;
}

/deep/.distpicker-address-wrapper select {
  height: 34px;
  font-size: 13px;
}

.grid-content__select {
  margin-top: 10px;
  margin-left: 10px;
  width: 200px;

  &--popper {
    width: 300px;
  }
}
</style>
